package main

import (
	"flag"
	"fmt"
	"io"
	"log"
)

func func1(s string) (n int, err error) {
	defer func() {
		log.Printf("func1(%q) = %d, %v", s, n, err)
	}()
	return 7, io.EOF
}

func main2() {
	func1("Go")
}

var skillParam = flag.String("skill", "fire", "skill to perform")

func main() {
	flag.Parse()
	var skill = map[string]func(){
		"fire": func() {
			fmt.Println("chicken fire")
		},
		"run": func() {
			fmt.Println("soldier run")
		},
		"fly": func() {
			fmt.Println("angel fly")
		},
	}

	//if f, ok := skill["*skillParam"]; ok {
	if f, ok := skill["run"]; ok {
		f()
	} else {
		fmt.Println("skill not found")
	}
}
